package client;

import java.io.File;
import javax.swing.ImageIcon;

public class Immagine extends ImageIcon{
	public static final long serialVersionUID=0;
	public Immagine(String path){
		String defaultPath="./data/immagini/";
		File file = new File(defaultPath+path);
		if (file.exists()){
			this.setImage(new ImageIcon(defaultPath+path).getImage());
		} else {
			System.out.println("Non ho trovato questo file: " + defaultPath+path);
		}
	}
	
}
